#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin >> n;
	int B = 0,  A = 0;
	for(int i=1; i<=n; i++)
	{
		int x;
		cin >> x;
		if(x >= 60)
			B++;
		if(x >= 85)
			A++;
	}	
	double a = (1.0*A) * 100  / n + 0.5;
	double b = (1.0*B) * 100  / n + 0.5;
	cout << (int)b << '%' << endl;
	cout << (int)a << '%' << endl;
	return 0;
}